package com.uex.dev.manage.admin.intercepter;

import com.uex.dev.manage.admin.po.UserPO;

/**
 * @author lzs
 * @create 2024/02/23
 * @description
 */

public class UserContext {
    static ThreadLocal<UserPO> userInfoLocal = new ThreadLocal<>();

    public static void setUserInfoLocal(UserPO userPO) {
        userInfoLocal.set(userPO);
    }

    public static UserPO getUserInfoLocal() {
        return userInfoLocal.get();
    }

    public static void clear() {
        userInfoLocal.remove();
    }
}

